<template>
    <div>
        <el-breadcrumb separator="/">
            <el-breadcrumb-item v-for="(item,index) in $route.meta" :key="index">
                <router-link :to="item.url" v-if="item.url">{{item.name}}</router-link>
                <a v-else>{{item.name}}</a>
            </el-breadcrumb-item>
        </el-breadcrumb>
    </div>
</template>

<script>
import {Breadcrumb,BreadcrumbItem} from "element-ui";
    export default {
        // 是基于element-ui 面包屑导航的二次封装
        components:{
            "el-breadcrumb":Breadcrumb,
            "el-breadcrumb-item":BreadcrumbItem,
        }
    }
</script>

<style lang="scss" scoped>

</style>